\(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx\) [225]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 363 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \text {arctanh}(\sin (e+f x))}{2 a^3 f}-\frac {2 d \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right ) \tan (e+f x)}{15 a^3 f}-\frac {d^2 \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x) \tan (e+f x)}{30 a^3 f}-\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3} \]

[Out]

1/2*d^3*(40*c^3-90*c^2*d+78*c*d^2-23*d^3)*arctanh(sin(f*x+e))/a^3/f-2/15*d*(2*c^5+18*c^4*d+107*c^3*d^2-472*c^2
*d^3+456*c*d^4-136*d^5)*tan(f*x+e)/a^3/f-1/30*d^2*(4*c^4+36*c^3*d+216*c^2*d^2-626*c*d^3+345*d^4)*sec(f*x+e)*ta
n(f*x+e)/a^3/f-1/15*d*(2*c^3+18*c^2*d+111*c*d^2-136*d^3)*(c+d*sec(f*x+e))^2*tan(f*x+e)/a^3/f+1/15*(c-d)*(2*c^2
+18*c*d+115*d^2)*(c+d*sec(f*x+e))^3*tan(f*x+e)/f/(a^3+a^3*sec(f*x+e))+1/15*(c-d)*(2*c+13*d)*(c+d*sec(f*x+e))^4
*tan(f*x+e)/a/f/(a+a*sec(f*x+e))^2+1/5*(c-d)*(c+d*sec(f*x+e))^5*tan(f*x+e)/f/(a+a*sec(f*x+e))^3

Rubi [A] (verified)

Time = 0.65 (sec) , antiderivative size = 405, normalized size of antiderivative = 1.12, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {4072, 100, 155, 158, 152, 65, 223, 209} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^3}{15 f \left (a^3 \sec (e+f x)+a^3\right )}-\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{15 a^3 f}-\frac {d \tan (e+f x) \left (d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x)+4 \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right )\right )}{30 a^3 f}+\frac {d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \tan (e+f x) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^5}{5 f (a \sec (e+f x)+a)^3}+\frac {(c-d) (2 c+13 d) \tan (e+f x) (c+d \sec (e+f x))^4}{15 a f (a \sec (e+f x)+a)^2} \]

[In]

Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^6)/(a + a*Sec[e + f*x])^3,x]

[Out]

(d^3*(40*c^3 - 90*c^2*d + 78*c*d^2 - 23*d^3)*ArcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a*(1 + Sec[e + f*x])]]*Tan[e
 + f*x])/(a^2*f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) - (d*(2*c^3 + 18*c^2*d + 111*c*d^2 - 136*d^
3)*(c + d*Sec[e + f*x])^2*Tan[e + f*x])/(15*a^3*f) + ((c - d)*(2*c^2 + 18*c*d + 115*d^2)*(c + d*Sec[e + f*x])^
3*Tan[e + f*x])/(15*f*(a^3 + a^3*Sec[e + f*x])) + ((c - d)*(2*c + 13*d)*(c + d*Sec[e + f*x])^4*Tan[e + f*x])/(
15*a*f*(a + a*Sec[e + f*x])^2) + ((c - d)*(c + d*Sec[e + f*x])^5*Tan[e + f*x])/(5*f*(a + a*Sec[e + f*x])^3) -
(d*(4*(2*c^5 + 18*c^4*d + 107*c^3*d^2 - 472*c^2*d^3 + 456*c*d^4 - 136*d^5) + d*(4*c^4 + 36*c^3*d + 216*c^2*d^2
 - 626*c*d^3 + 345*d^4)*Sec[e + f*x])*Tan[e + f*x])/(30*a^3*f)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 100

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*c -
a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 152

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol]
:> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)
^(m + 1)*((c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Dist[(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d
*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1
)*(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)), Int[(a + b*x)^m*(c + d*x)
^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]

Rule 155

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] - Dist[1
/(b*(b*e - a*f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b*c*(f*g - e*h)*(m + 1) + (
b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h)*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; Free
Q[{a, b, c, d, e, f, g, h, p}, x] && LtQ[m, -1] && GtQ[n, 0] && IntegersQ[2*m, 2*n, 2*p]

Rule 158

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Dist[1/(d*f*(m + n
 + p + 2)), Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2) - h*(b*c*e*m + a*(d*e*(
n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) + h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x]
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] && IntegerQ[m]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 4072

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[a^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]
])), Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c+d x)^6}{\sqrt {a-a x} (a+a x)^{7/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x)^4 \left (-a^2 \left (2 c^2+8 c d-5 d^2\right )+a^2 (3 c-8 d) d x\right )}{\sqrt {a-a x} (a+a x)^{5/2}} \, dx,x,\sec (e+f x)\right )}{5 a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x)^3 \left (-a^4 \left (2 c^3+10 c^2 d+55 c d^2-52 d^3\right )+3 a^4 d \left (2 c^2+14 c d-21 d^2\right ) x\right )}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{15 a^4 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x)^2 \left (-3 a^6 d^2 \left (2 c^2+118 c d-115 d^2\right )+3 a^6 d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{15 a^7 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x) \left (3 a^8 d^2 \left (2 c^3+318 c^2 d-567 c d^2+272 d^3\right )-3 a^8 d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{45 a^9 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {d \left (4 \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right )+d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x)\right ) \tan (e+f x)}{30 a^3 f}-\frac {\left (d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{2 a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {d \left (4 \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right )+d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x)\right ) \tan (e+f x)}{30 a^3 f}+\frac {\left (d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {d \left (4 \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right )+d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x)\right ) \tan (e+f x)}{30 a^3 f}+\frac {\left (d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {d^3 \left (40 c^3-90 c^2 d+78 c d^2-23 d^3\right ) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {d \left (2 c^3+18 c^2 d+111 c d^2-136 d^3\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{15 a^3 f}+\frac {(c-d) \left (2 c^2+18 c d+115 d^2\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{15 f \left (a^3+a^3 \sec (e+f x)\right )}+\frac {(c-d) (2 c+13 d) (c+d \sec (e+f x))^4 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {(c-d) (c+d \sec (e+f x))^5 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {d \left (4 \left (2 c^5+18 c^4 d+107 c^3 d^2-472 c^2 d^3+456 c d^4-136 d^5\right )+d \left (4 c^4+36 c^3 d+216 c^2 d^2-626 c d^3+345 d^4\right ) \sec (e+f x)\right ) \tan (e+f x)}{30 a^3 f} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1338\) vs. \(2(363)=726\).

Time = 9.81 (sec) , antiderivative size = 1338, normalized size of antiderivative = 3.69 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {4 \left (-40 c^3 d^3+90 c^2 d^4-78 c d^5+23 d^6\right ) \cos ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c+d \sec (e+f x))^6}{f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}-\frac {4 \left (-40 c^3 d^3+90 c^2 d^4-78 c d^5+23 d^6\right ) \cos ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c+d \sec (e+f x))^6}{f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {2 \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \sec \left (\frac {e}{2}\right ) (c+d \sec (e+f x))^6 \left (c^6 \sin \left (\frac {e}{2}\right )-6 c^5 d \sin \left (\frac {e}{2}\right )+15 c^4 d^2 \sin \left (\frac {e}{2}\right )-20 c^3 d^3 \sin \left (\frac {e}{2}\right )+15 c^2 d^4 \sin \left (\frac {e}{2}\right )-6 c d^5 \sin \left (\frac {e}{2}\right )+d^6 \sin \left (\frac {e}{2}\right )\right )}{5 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {8 \cos ^4\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \sec \left (\frac {e}{2}\right ) (c+d \sec (e+f x))^6 \left (-4 c^6 \sin \left (\frac {e}{2}\right )+9 c^5 d \sin \left (\frac {e}{2}\right )+15 c^4 d^2 \sin \left (\frac {e}{2}\right )-70 c^3 d^3 \sin \left (\frac {e}{2}\right )+90 c^2 d^4 \sin \left (\frac {e}{2}\right )-51 c d^5 \sin \left (\frac {e}{2}\right )+11 d^6 \sin \left (\frac {e}{2}\right )\right )}{15 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {2 \cos \left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \sec \left (\frac {e}{2}\right ) (c+d \sec (e+f x))^6 \left (c^6 \sin \left (\frac {f x}{2}\right )-6 c^5 d \sin \left (\frac {f x}{2}\right )+15 c^4 d^2 \sin \left (\frac {f x}{2}\right )-20 c^3 d^3 \sin \left (\frac {f x}{2}\right )+15 c^2 d^4 \sin \left (\frac {f x}{2}\right )-6 c d^5 \sin \left (\frac {f x}{2}\right )+d^6 \sin \left (\frac {f x}{2}\right )\right )}{5 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {8 \cos ^3\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \sec \left (\frac {e}{2}\right ) (c+d \sec (e+f x))^6 \left (-4 c^6 \sin \left (\frac {f x}{2}\right )+9 c^5 d \sin \left (\frac {f x}{2}\right )+15 c^4 d^2 \sin \left (\frac {f x}{2}\right )-70 c^3 d^3 \sin \left (\frac {f x}{2}\right )+90 c^2 d^4 \sin \left (\frac {f x}{2}\right )-51 c d^5 \sin \left (\frac {f x}{2}\right )+11 d^6 \sin \left (\frac {f x}{2}\right )\right )}{15 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {8 \cos ^5\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \sec \left (\frac {e}{2}\right ) (c+d \sec (e+f x))^6 \left (7 c^6 \sin \left (\frac {f x}{2}\right )+18 c^5 d \sin \left (\frac {f x}{2}\right )+30 c^4 d^2 \sin \left (\frac {f x}{2}\right )-440 c^3 d^3 \sin \left (\frac {f x}{2}\right )+855 c^2 d^4 \sin \left (\frac {f x}{2}\right )-642 c d^5 \sin \left (\frac {f x}{2}\right )+172 d^6 \sin \left (\frac {f x}{2}\right )\right )}{15 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {8 d^6 \cos ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \sec (e) (c+d \sec (e+f x))^6 \sin (f x)}{3 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}-\frac {4 \cos ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^2(e+f x) \sec (e) (c+d \sec (e+f x))^6 \left (-18 c d^5 \sin (e)+9 d^6 \sin (e)-90 c^2 d^4 \sin (f x)+108 c d^5 \sin (f x)-40 d^6 \sin (f x)\right )}{3 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3}+\frac {4 \cos ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos (e+f x) \sec (e) (c+d \sec (e+f x))^6 \left (2 d^6 \sin (e)+18 c d^5 \sin (f x)-9 d^6 \sin (f x)\right )}{3 f (d+c \cos (e+f x))^6 (a+a \sec (e+f x))^3} \]

[In]

Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^6)/(a + a*Sec[e + f*x])^3,x]

[Out]

(4*(-40*c^3*d^3 + 90*c^2*d^4 - 78*c*d^5 + 23*d^6)*Cos[e/2 + (f*x)/2]^6*Cos[e + f*x]^3*Log[Cos[e/2 + (f*x)/2] -
 Sin[e/2 + (f*x)/2]]*(c + d*Sec[e + f*x])^6)/(f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) - (4*(-40*c^3*d
^3 + 90*c^2*d^4 - 78*c*d^5 + 23*d^6)*Cos[e/2 + (f*x)/2]^6*Cos[e + f*x]^3*Log[Cos[e/2 + (f*x)/2] + Sin[e/2 + (f
*x)/2]]*(c + d*Sec[e + f*x])^6)/(f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) + (2*Cos[e/2 + (f*x)/2]^2*Co
s[e + f*x]^3*Sec[e/2]*(c + d*Sec[e + f*x])^6*(c^6*Sin[e/2] - 6*c^5*d*Sin[e/2] + 15*c^4*d^2*Sin[e/2] - 20*c^3*d
^3*Sin[e/2] + 15*c^2*d^4*Sin[e/2] - 6*c*d^5*Sin[e/2] + d^6*Sin[e/2]))/(5*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e
 + f*x])^3) + (8*Cos[e/2 + (f*x)/2]^4*Cos[e + f*x]^3*Sec[e/2]*(c + d*Sec[e + f*x])^6*(-4*c^6*Sin[e/2] + 9*c^5*
d*Sin[e/2] + 15*c^4*d^2*Sin[e/2] - 70*c^3*d^3*Sin[e/2] + 90*c^2*d^4*Sin[e/2] - 51*c*d^5*Sin[e/2] + 11*d^6*Sin[
e/2]))/(15*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) + (2*Cos[e/2 + (f*x)/2]*Cos[e + f*x]^3*Sec[e/2]*(c
 + d*Sec[e + f*x])^6*(c^6*Sin[(f*x)/2] - 6*c^5*d*Sin[(f*x)/2] + 15*c^4*d^2*Sin[(f*x)/2] - 20*c^3*d^3*Sin[(f*x)
/2] + 15*c^2*d^4*Sin[(f*x)/2] - 6*c*d^5*Sin[(f*x)/2] + d^6*Sin[(f*x)/2]))/(5*f*(d + c*Cos[e + f*x])^6*(a + a*S
ec[e + f*x])^3) + (8*Cos[e/2 + (f*x)/2]^3*Cos[e + f*x]^3*Sec[e/2]*(c + d*Sec[e + f*x])^6*(-4*c^6*Sin[(f*x)/2]
+ 9*c^5*d*Sin[(f*x)/2] + 15*c^4*d^2*Sin[(f*x)/2] - 70*c^3*d^3*Sin[(f*x)/2] + 90*c^2*d^4*Sin[(f*x)/2] - 51*c*d^
5*Sin[(f*x)/2] + 11*d^6*Sin[(f*x)/2]))/(15*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) + (8*Cos[e/2 + (f*
x)/2]^5*Cos[e + f*x]^3*Sec[e/2]*(c + d*Sec[e + f*x])^6*(7*c^6*Sin[(f*x)/2] + 18*c^5*d*Sin[(f*x)/2] + 30*c^4*d^
2*Sin[(f*x)/2] - 440*c^3*d^3*Sin[(f*x)/2] + 855*c^2*d^4*Sin[(f*x)/2] - 642*c*d^5*Sin[(f*x)/2] + 172*d^6*Sin[(f
*x)/2]))/(15*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) + (8*d^6*Cos[e/2 + (f*x)/2]^6*Sec[e]*(c + d*Sec[
e + f*x])^6*Sin[f*x])/(3*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) - (4*Cos[e/2 + (f*x)/2]^6*Cos[e + f*
x]^2*Sec[e]*(c + d*Sec[e + f*x])^6*(-18*c*d^5*Sin[e] + 9*d^6*Sin[e] - 90*c^2*d^4*Sin[f*x] + 108*c*d^5*Sin[f*x]
 - 40*d^6*Sin[f*x]))/(3*f*(d + c*Cos[e + f*x])^6*(a + a*Sec[e + f*x])^3) + (4*Cos[e/2 + (f*x)/2]^6*Cos[e + f*x
]*Sec[e]*(c + d*Sec[e + f*x])^6*(2*d^6*Sin[e] + 18*c*d^5*Sin[f*x] - 9*d^6*Sin[f*x]))/(3*f*(d + c*Cos[e + f*x])
^6*(a + a*Sec[e + f*x])^3)

Maple [A] (verified)

Time = 1.47 (sec) , antiderivative size = 491, normalized size of antiderivative = 1.35

method result size
parallelrisch \(\frac {-14400 \left (c^{3}-\frac {9}{4} c^{2} d +\frac {39}{20} c \,d^{2}-\frac {23}{40} d^{3}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+14400 \left (c^{3}-\frac {9}{4} c^{2} d +\frac {39}{20} c \,d^{2}-\frac {23}{40} d^{3}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\left (\frac {43}{12} c^{6}+\frac {1549}{6} d^{6}-859 c \,d^{5}+\frac {95}{2} c^{4} d^{2}-\frac {1190}{3} c^{3} d^{3}+1035 c^{2} d^{4}+\frac {27}{2} c^{5} d \right ) \cos \left (3 f x +3 e \right )+\left (36 c^{5} d +4 c^{6}+\frac {1382}{3} d^{6}-1524 c \,d^{5}+60 c^{4} d^{2}-680 c^{3} d^{3}+1860 c^{2} d^{4}\right ) \cos \left (2 f x +2 e \right )+\left (c^{6}+\frac {429}{4} d^{6}+9 c^{5} d +15 c^{4} d^{2}-170 c^{3} d^{3}+\frac {855}{2} c^{2} d^{4}-\frac {717}{2} c \,d^{5}\right ) \cos \left (4 f x +4 e \right )+\left (\frac {7}{12} c^{6}+\frac {68}{3} d^{6}-76 c \,d^{5}+\frac {3}{2} c^{5} d +\frac {5}{2} c^{4} d^{2}-\frac {110}{3} c^{3} d^{3}+90 c^{2} d^{4}\right ) \cos \left (5 f x +5 e \right )+\left (\frac {3907}{6} d^{6}+33 c^{5} d +\frac {47}{6} c^{6}-\frac {3020}{3} c^{3} d^{3}+2655 c^{2} d^{4}-2137 c \,d^{5}+130 c^{4} d^{2}\right ) \cos \left (f x +e \right )+\frac {4321 d^{6}}{12}+3 c^{6}+27 c^{5} d +45 c^{4} d^{2}-510 c^{3} d^{3}+\frac {2865 c^{2} d^{4}}{2}-\frac {2331 c \,d^{5}}{2}\right ) \sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{240 f \,a^{3} \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) \(491\)
derivativedivides \(\frac {-\frac {4 d^{6}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}+c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+49 d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 d^{6}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {2 c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {10 d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+2 d^{3} \left (40 c^{3}-90 c^{2} d +78 c \,d^{2}-23 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {2 d^{4} \left (30 c^{2}-42 c d +17 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-4 c^{3} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-\frac {6 c^{5} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+3 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}+3 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-\frac {6 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+10 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+30 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+6 c^{5} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+15 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+255 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-186 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 d^{5} \left (3 c -2 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-16 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}-140 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{3} d^{3}-\frac {80 c^{3} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {4 d^{5} \left (3 c -2 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-2 d^{3} \left (40 c^{3}-90 c^{2} d +78 c \,d^{2}-23 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\frac {2 d^{4} \left (30 c^{2}-42 c d +17 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{4 f \,a^{3}}\) \(579\)
default \(\frac {-\frac {4 d^{6}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}+c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+49 d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 d^{6}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {2 c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {10 d^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {c^{6} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+2 d^{3} \left (40 c^{3}-90 c^{2} d +78 c \,d^{2}-23 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {2 d^{4} \left (30 c^{2}-42 c d +17 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-4 c^{3} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-\frac {6 c^{5} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+3 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}+3 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-\frac {6 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+10 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+30 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+6 c^{5} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+15 c^{4} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+255 c^{2} d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-186 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 d^{5} \left (3 c -2 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-16 c \,d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}-140 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{3} d^{3}-\frac {80 c^{3} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {4 d^{5} \left (3 c -2 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-2 d^{3} \left (40 c^{3}-90 c^{2} d +78 c \,d^{2}-23 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\frac {2 d^{4} \left (30 c^{2}-42 c d +17 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{4 f \,a^{3}}\) \(579\)
risch \(\text {Expression too large to display}\) \(1331\)

[In]

int(sec(f*x+e)*(c+d*sec(f*x+e))^6/(a+a*sec(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/240*(-14400*(c^3-9/4*c^2*d+39/20*c*d^2-23/40*d^3)*(cos(f*x+e)+1/3*cos(3*f*x+3*e))*d^3*ln(tan(1/2*f*x+1/2*e)-
1)+14400*(c^3-9/4*c^2*d+39/20*c*d^2-23/40*d^3)*(cos(f*x+e)+1/3*cos(3*f*x+3*e))*d^3*ln(tan(1/2*f*x+1/2*e)+1)+12
*tan(1/2*f*x+1/2*e)*((43/12*c^6+1549/6*d^6-859*c*d^5+95/2*c^4*d^2-1190/3*c^3*d^3+1035*c^2*d^4+27/2*c^5*d)*cos(
3*f*x+3*e)+(36*c^5*d+4*c^6+1382/3*d^6-1524*c*d^5+60*c^4*d^2-680*c^3*d^3+1860*c^2*d^4)*cos(2*f*x+2*e)+(c^6+429/
4*d^6+9*c^5*d+15*c^4*d^2-170*c^3*d^3+855/2*c^2*d^4-717/2*c*d^5)*cos(4*f*x+4*e)+(7/12*c^6+68/3*d^6-76*c*d^5+3/2
*c^5*d+5/2*c^4*d^2-110/3*c^3*d^3+90*c^2*d^4)*cos(5*f*x+5*e)+(3907/6*d^6+33*c^5*d+47/6*c^6-3020/3*c^3*d^3+2655*
c^2*d^4-2137*c*d^5+130*c^4*d^2)*cos(f*x+e)+4321/12*d^6+3*c^6+27*c^5*d+45*c^4*d^2-510*c^3*d^3+2865/2*c^2*d^4-23
31/2*c*d^5)*sec(1/2*f*x+1/2*e)^4)/f/a^3/(cos(3*f*x+3*e)+3*cos(f*x+e))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 620, normalized size of antiderivative = 1.71 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {15 \, {\left ({\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{6} + 3 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{5} + 3 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{4} + {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left ({\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{6} + 3 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{5} + 3 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{4} + {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (10 \, d^{6} + 2 \, {\left (7 \, c^{6} + 18 \, c^{5} d + 30 \, c^{4} d^{2} - 440 \, c^{3} d^{3} + 1080 \, c^{2} d^{4} - 912 \, c d^{5} + 272 \, d^{6}\right )} \cos \left (f x + e\right )^{5} + 3 \, {\left (4 \, c^{6} + 36 \, c^{5} d + 60 \, c^{4} d^{2} - 680 \, c^{3} d^{3} + 1710 \, c^{2} d^{4} - 1434 \, c d^{5} + 429 \, d^{6}\right )} \cos \left (f x + e\right )^{4} + {\left (4 \, c^{6} + 36 \, c^{5} d + 210 \, c^{4} d^{2} - 1280 \, c^{3} d^{3} + 3510 \, c^{2} d^{4} - 2874 \, c d^{5} + 869 \, d^{6}\right )} \cos \left (f x + e\right )^{3} + 5 \, {\left (90 \, c^{2} d^{4} - 54 \, c d^{5} + 19 \, d^{6}\right )} \cos \left (f x + e\right )^{2} + 15 \, {\left (6 \, c d^{5} - d^{6}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{60 \, {\left (a^{3} f \cos \left (f x + e\right )^{6} + 3 \, a^{3} f \cos \left (f x + e\right )^{5} + 3 \, a^{3} f \cos \left (f x + e\right )^{4} + a^{3} f \cos \left (f x + e\right )^{3}\right )}} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^6/(a+a*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

1/60*(15*((40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^6 + 3*(40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5
 - 23*d^6)*cos(f*x + e)^5 + 3*(40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^4 + (40*c^3*d^3 - 90*
c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^3)*log(sin(f*x + e) + 1) - 15*((40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 -
 23*d^6)*cos(f*x + e)^6 + 3*(40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^5 + 3*(40*c^3*d^3 - 90*
c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^4 + (40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*cos(f*x + e)^3)*lo
g(-sin(f*x + e) + 1) + 2*(10*d^6 + 2*(7*c^6 + 18*c^5*d + 30*c^4*d^2 - 440*c^3*d^3 + 1080*c^2*d^4 - 912*c*d^5 +
 272*d^6)*cos(f*x + e)^5 + 3*(4*c^6 + 36*c^5*d + 60*c^4*d^2 - 680*c^3*d^3 + 1710*c^2*d^4 - 1434*c*d^5 + 429*d^
6)*cos(f*x + e)^4 + (4*c^6 + 36*c^5*d + 210*c^4*d^2 - 1280*c^3*d^3 + 3510*c^2*d^4 - 2874*c*d^5 + 869*d^6)*cos(
f*x + e)^3 + 5*(90*c^2*d^4 - 54*c*d^5 + 19*d^6)*cos(f*x + e)^2 + 15*(6*c*d^5 - d^6)*cos(f*x + e))*sin(f*x + e)
)/(a^3*f*cos(f*x + e)^6 + 3*a^3*f*cos(f*x + e)^5 + 3*a^3*f*cos(f*x + e)^4 + a^3*f*cos(f*x + e)^3)

Sympy [F]

\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {\int \frac {c^{6} \sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{6} \sec ^{7}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {6 c d^{5} \sec ^{6}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {15 c^{2} d^{4} \sec ^{5}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {20 c^{3} d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {15 c^{4} d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {6 c^{5} d \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx}{a^{3}} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))**6/(a+a*sec(f*x+e))**3,x)

[Out]

(Integral(c**6*sec(e + f*x)/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(d**6*sec
(e + f*x)**7/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(6*c*d**5*sec(e + f*x)**
6/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(15*c**2*d**4*sec(e + f*x)**5/(sec(
e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(20*c**3*d**3*sec(e + f*x)**4/(sec(e + f*x
)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(15*c**4*d**2*sec(e + f*x)**3/(sec(e + f*x)**3 +
3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(6*c**5*d*sec(e + f*x)**2/(sec(e + f*x)**3 + 3*sec(e + f
*x)**2 + 3*sec(e + f*x) + 1), x))/a**3

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 946 vs. \(2 (349) = 698\).

Time = 0.25 (sec) , antiderivative size = 946, normalized size of antiderivative = 2.61 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\text {Too large to display} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^6/(a+a*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

1/60*(d^6*(20*(33*sin(f*x + e)/(cos(f*x + e) + 1) - 76*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 51*sin(f*x + e)^5
/(cos(f*x + e) + 1)^5)/(a^3 - 3*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*a^3*sin(f*x + e)^4/(cos(f*x + e) +
 1)^4 - a^3*sin(f*x + e)^6/(cos(f*x + e) + 1)^6) + (735*sin(f*x + e)/(cos(f*x + e) + 1) + 50*sin(f*x + e)^3/(c
os(f*x + e) + 1)^3 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 - 690*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)
/a^3 + 690*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a^3) - 6*c*d^5*(60*(5*sin(f*x + e)/(cos(f*x + e) + 1) - 7*
sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a^3 - 2*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^3*sin(f*x + e)^4/(co
s(f*x + e) + 1)^4) + (465*sin(f*x + e)/(cos(f*x + e) + 1) + 40*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x
 + e)^5/(cos(f*x + e) + 1)^5)/a^3 - 390*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 390*log(sin(f*x + e)/(c
os(f*x + e) + 1) - 1)/a^3) + 45*c^2*d^4*(40*sin(f*x + e)/((a^3 - a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)*(cos
(f*x + e) + 1)) + (85*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + sin(f*x + e)^
5/(cos(f*x + e) + 1)^5)/a^3 - 60*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 60*log(sin(f*x + e)/(cos(f*x +
 e) + 1) - 1)/a^3) - 20*c^3*d^3*((105*sin(f*x + e)/(cos(f*x + e) + 1) + 20*sin(f*x + e)^3/(cos(f*x + e) + 1)^3
 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 - 60*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 60*log(sin(f
*x + e)/(cos(f*x + e) + 1) - 1)/a^3) + 15*c^4*d^2*(15*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^3/(cos
(f*x + e) + 1)^3 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 + c^6*(15*sin(f*x + e)/(cos(f*x + e) + 1) - 10*s
in(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 + 18*c^5*d*(5*sin(f*x + e)/(co
s(f*x + e) + 1) - sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3)/f

Giac [A] (verification not implemented)

none

Time = 0.48 (sec) , antiderivative size = 672, normalized size of antiderivative = 1.85 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {\frac {30 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{3}} - \frac {30 \, {\left (40 \, c^{3} d^{3} - 90 \, c^{2} d^{4} + 78 \, c d^{5} - 23 \, d^{6}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{3}} - \frac {20 \, {\left (90 \, c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 126 \, c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 51 \, d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 180 \, c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 216 \, c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 76 \, d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 90 \, c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 90 \, c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 33 \, d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{3} a^{3}} + \frac {3 \, a^{12} c^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 18 \, a^{12} c^{5} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 45 \, a^{12} c^{4} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 60 \, a^{12} c^{3} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 45 \, a^{12} c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 18 \, a^{12} c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 3 \, a^{12} d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 10 \, a^{12} c^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 150 \, a^{12} c^{4} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 400 \, a^{12} c^{3} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 450 \, a^{12} c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 240 \, a^{12} c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 50 \, a^{12} d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, a^{12} c^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 90 \, a^{12} c^{5} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 225 \, a^{12} c^{4} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2100 \, a^{12} c^{3} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3825 \, a^{12} c^{2} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2790 \, a^{12} c d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 735 \, a^{12} d^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{15}}}{60 \, f} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^6/(a+a*sec(f*x+e))^3,x, algorithm="giac")

[Out]

1/60*(30*(40*c^3*d^3 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a^3 - 30*(40*c^3*d^3
 - 90*c^2*d^4 + 78*c*d^5 - 23*d^6)*log(abs(tan(1/2*f*x + 1/2*e) - 1))/a^3 - 20*(90*c^2*d^4*tan(1/2*f*x + 1/2*e
)^5 - 126*c*d^5*tan(1/2*f*x + 1/2*e)^5 + 51*d^6*tan(1/2*f*x + 1/2*e)^5 - 180*c^2*d^4*tan(1/2*f*x + 1/2*e)^3 +
216*c*d^5*tan(1/2*f*x + 1/2*e)^3 - 76*d^6*tan(1/2*f*x + 1/2*e)^3 + 90*c^2*d^4*tan(1/2*f*x + 1/2*e) - 90*c*d^5*
tan(1/2*f*x + 1/2*e) + 33*d^6*tan(1/2*f*x + 1/2*e))/((tan(1/2*f*x + 1/2*e)^2 - 1)^3*a^3) + (3*a^12*c^6*tan(1/2
*f*x + 1/2*e)^5 - 18*a^12*c^5*d*tan(1/2*f*x + 1/2*e)^5 + 45*a^12*c^4*d^2*tan(1/2*f*x + 1/2*e)^5 - 60*a^12*c^3*
d^3*tan(1/2*f*x + 1/2*e)^5 + 45*a^12*c^2*d^4*tan(1/2*f*x + 1/2*e)^5 - 18*a^12*c*d^5*tan(1/2*f*x + 1/2*e)^5 + 3
*a^12*d^6*tan(1/2*f*x + 1/2*e)^5 - 10*a^12*c^6*tan(1/2*f*x + 1/2*e)^3 + 150*a^12*c^4*d^2*tan(1/2*f*x + 1/2*e)^
3 - 400*a^12*c^3*d^3*tan(1/2*f*x + 1/2*e)^3 + 450*a^12*c^2*d^4*tan(1/2*f*x + 1/2*e)^3 - 240*a^12*c*d^5*tan(1/2
*f*x + 1/2*e)^3 + 50*a^12*d^6*tan(1/2*f*x + 1/2*e)^3 + 15*a^12*c^6*tan(1/2*f*x + 1/2*e) + 90*a^12*c^5*d*tan(1/
2*f*x + 1/2*e) + 225*a^12*c^4*d^2*tan(1/2*f*x + 1/2*e) - 2100*a^12*c^3*d^3*tan(1/2*f*x + 1/2*e) + 3825*a^12*c^
2*d^4*tan(1/2*f*x + 1/2*e) - 2790*a^12*c*d^5*tan(1/2*f*x + 1/2*e) + 735*a^12*d^6*tan(1/2*f*x + 1/2*e))/a^15)/f

Mupad [B] (verification not implemented)

Time = 13.62 (sec) , antiderivative size = 327, normalized size of antiderivative = 0.90 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^6}{(a+a \sec (e+f x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {5\,{\left (c-d\right )}^6}{2\,a^3}-\frac {6\,\left (c+d\right )\,{\left (c-d\right )}^5}{a^3}+\frac {15\,{\left (c+d\right )}^2\,{\left (c-d\right )}^4}{4\,a^3}\right )}{f}-\frac {\left (30\,c^2\,d^4-42\,c\,d^5+17\,d^6\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-60\,c^2\,d^4+72\,c\,d^5-\frac {76\,d^6}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (30\,c^2\,d^4-30\,c\,d^5+11\,d^6\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-3\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+3\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^3\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {{\left (c-d\right )}^6}{3\,a^3}-\frac {\left (c+d\right )\,{\left (c-d\right )}^5}{2\,a^3}\right )}{f}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,{\left (c-d\right )}^6}{20\,a^3\,f}+\frac {d^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (40\,c^3-90\,c^2\,d+78\,c\,d^2-23\,d^3\right )}{a^3\,f} \]

[In]

int((c + d/cos(e + f*x))^6/(cos(e + f*x)*(a + a/cos(e + f*x))^3),x)

[Out]

(tan(e/2 + (f*x)/2)*((5*(c - d)^6)/(2*a^3) - (6*(c + d)*(c - d)^5)/a^3 + (15*(c + d)^2*(c - d)^4)/(4*a^3)))/f
- (tan(e/2 + (f*x)/2)*(11*d^6 - 30*c*d^5 + 30*c^2*d^4) + tan(e/2 + (f*x)/2)^5*(17*d^6 - 42*c*d^5 + 30*c^2*d^4)
 - tan(e/2 + (f*x)/2)^3*((76*d^6)/3 - 72*c*d^5 + 60*c^2*d^4))/(f*(3*a^3*tan(e/2 + (f*x)/2)^2 - 3*a^3*tan(e/2 +
 (f*x)/2)^4 + a^3*tan(e/2 + (f*x)/2)^6 - a^3)) + (tan(e/2 + (f*x)/2)^3*((c - d)^6/(3*a^3) - ((c + d)*(c - d)^5
)/(2*a^3)))/f + (tan(e/2 + (f*x)/2)^5*(c - d)^6)/(20*a^3*f) + (d^3*atanh(tan(e/2 + (f*x)/2))*(78*c*d^2 - 90*c^
2*d + 40*c^3 - 23*d^3))/(a^3*f)